
    /**  
    * @Title: Table.java
    * @Package com.demo
    * @Description: 
    * @author likai
    * @date 2017年4月9日
    * @version V1.0  
    */
    
package com.supers.pojo;


import java.text.ParseException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.utils.date.CalendarUtil;
import com.utils.date.DateUtil;

/**
    * @ClassName: Table
    * @Description: 
    * @author likai
    * @date 2017年4月9日
    *
    */
@Deprecated
public  class Table{
	public static Logger log = LoggerFactory.getLogger(Table.class);

	public int pageNum=1;//第几页最小值为1
	public int pageSize=0;//取出数据量
	//参与sql构成参数---start
	public String order="";//排序列(多列用","隔开)
	public String sort="";//0 desc,1 asc(多列用","隔开1,0,1,1，不传默认全部正序,多个需要与order对应)
	public String selectCols="*";//查询的列
	public String orderLimit="";//排序分页
	public String duplicateUpdateCol;//插入数据唯一键冲突，更新字段，默认updateDate,需为驼峰式
	public Object duplicateUpdateValue;//插入数据唯一键冲突，更新字段值
	public String lock="";//单条记录查询是否加for update 锁

	//参与sql构成参数---end
	
	//-----请求返回参数
	public String createDateStr;//创建日期格式化字符串
	public String updateDateStr;//更新日期格式化字符串
	
	//-----公共业务参数
	public String sign="";//签名
	public String requestFrom;//请求来源
	public String clientIp="";//客户端ip
	//-----查询业务参数
	public String keyWord;//查询关键字
	public String qStartDate;//查询开始时间
	public String qEndDate;//查询结束时间
	public Integer qStartTime;//查询开始时间,时间戳
	public Integer qEndTime;//查询结束时间,时间戳
	
	//不允许前端直接传值的参数
	public void setOrderLimit(String table,String unuse){};
	public void setOrderLimit(String orderLimit) {}
	public void setSelectCols(String selectCols) {}
	public void setLock(String lock) {this.lock = " for update ";}
	//设置插入唯一键冲突更新字段和值
	public void setDuplicateUpdateColVal(String duplicateUpdateCol,Object duplicateUpdateValue) {
		this.duplicateUpdateCol = duplicateUpdateCol;
		this.duplicateUpdateValue = duplicateUpdateValue;
	}
	

	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	
	public int getPageNum() {
		return pageNum;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setOrder(String order) {
		this.order = order;
	}
	public void setSort(String sort) {
		this.sort = sort;
	}
	public String getLock() {
		return lock;
	}
	public String getOrder() {
		return order;
	}

	public String getSort() {
		return sort;
	}

	public String getSelectCols() {
		return selectCols;
	}
	
	public String getOrderLimit() {
		return orderLimit;
	}


	public String getSign() {
		return sign;
	}
	public void setSign(String sign) {
		this.sign = sign;
	}
	public String getClientIp() {
		return clientIp;
	}
	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}
	
	
	public String getKeyWord() {
		return keyWord;
	}
	public void setKeyWord(String keyWord) {
		this.keyWord = keyWord;
	}
	public String getRequestFrom() {
		return requestFrom;
	}
	public void setRequestFrom(String requestFrom) {
		this.requestFrom = requestFrom;
	}
	public String getqStartDate() {
		return qStartDate;
	}
	
	public void setqStartDate(String qStartDate) throws ParseException {
		setqStartTime(CalendarUtil.getDateShortTime(CalendarUtil.getPreNDayBegin(DateUtil.COMMON.getTextDate(qStartDate), 0)));//截止日期00:00:00时刻
		this.qStartDate = qStartDate;
	}
	public String getqEndDate() {
		return qEndDate;
	}
	public void setqEndDate(String qEndDate) throws ParseException {
		setqEndTime(CalendarUtil.getDateShortTime(CalendarUtil.getPreNDayEnd(DateUtil.COMMON.getTextDate(qEndDate), 0)));//截止日期23:59:59时刻
		this.qEndDate = qEndDate;
	}
	public Integer getqStartTime() {
		return qStartTime;
	}
	public void setqStartTime(Integer qStartTime) {
		this.qStartTime = qStartTime;
	}
	public Integer getqEndTime() {
		return qEndTime;
	}
	public void setqEndTime(Integer qEndTime) {
		this.qEndTime = qEndTime;
	}
	public String getCreateDateStr() {
		return createDateStr;
	}
	public void setCreateDateStr(String createDateStr) {
		this.createDateStr = createDateStr;
	}
	public String getUpdateDateStr() {
		return updateDateStr;
	}
	public void setUpdateDateStr(String updateDateStr) {
		this.updateDateStr = updateDateStr;
	}
	public String getDuplicateUpdateCol() {
		return duplicateUpdateCol;
	}

	
	
	
	/*pojo.setOrder("createDate");
	pojo.setSort(TableSort.DESC.getSort());
	pojo.setSelectCols("", Red.selectColumn2);
	pojo.setOrderLimit("");*/
}
